package com.kstech.exccheck.view.check;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.kstech.exccheck.R;

/**
 * 
 * @author wanghaibin
 * @created 2016-10-20 ����2:03:39
 * @since v1.0
 */
public class CheckItemLayout extends LinearLayout{

	/**
	 * @param context
	 */
	public CheckItemLayout(Context context) {
		super(context);
	}
	public ImageView arrRight;
	public TextView itemIdTv, itemNameTv;
	public ImageView itemCheckResultImage;
	private boolean isSelected = false;


	public void setSelected(LinearLayout ly){
		arrRight = (ImageView)ly.getChildAt(1);
		arrRight.setVisibility(View.VISIBLE);
		itemNameTv = (TextView)ly.getChildAt(2);
		itemNameTv.setTextColor(getResources().getColor(R.color.selectedCheckItemTextColor));
		isSelected = true;
	}

	public void cancelSelected(){
		arrRight.setVisibility(View.GONE);
		itemNameTv.setTextColor(getResources().getColor(R.color.white));
		isSelected = false;
	}
	public boolean isSelected(){
		return isSelected;
	}
}
